Description of all hs_init.sqs Options
Below is a list describing all of the options in the hs_init.sqs script, in the order that they appear. There are comments in the script (above each option) that briefly describe the option, but you can refer here if you need a more detailed description. Red options are ones that MUST be set first before using the scripts. Other options can be left at their defaults, or adjusted at the editor's discretion. All global variables (ones that don't start with an underscore _ ) can also be adjusted after mission start.
Squad Settings
_team1/2/3 group
Here you assign the GROUPS that will be used for the player's HS squad. Each team must be assigned a group that has at least 1 unit in it. _team1 is the 1st fireteam, _team2 is the second, and _team3 is the third. The RTO team is assigned in _rto (below).
_rto group
Here you place the GROUP of the HS squad's radio operator. This group should only contain one unit. The player will be able to order this unit around separately from the other fire teams. Really you don't have to make this unit an RTO, but that is what this slot is designed for, and that is what all text and sounds for this group reflect. If you do not wish to use an RTO, then place grpNull here.
_t1/2/3_names array
These arrays contain the names (strings) shown for each group member in the status reports (given during rallies). The first entry will be for the first (highest ranking) member in the squad, the second entry for the next, etc. If you put empty quotes "", or if there isn't an entry for a unit in the group (not enough entries), then the unit's name will be used instead.
An example of use would be to describe each unit according to his weapons. For example: _t1_names = ["Team Leader", "Rifleman", "Machinegunner", "Grenadier", "Medic"].
_rto_name string
Same as above, only this is a single string instead of an array. This string is used for the RTO.
_report array
Here you can provide additional information to be displayed in the status report during rallies. For example, you could provide the number of Shilkas destroyed, the number of POWs captured, etc. This variable is an array of arrays, which looks like this:
[ ["1st display name", "1st variable name"], ["2nd display name", "2nd variable name"] ... ]
Where "display name" is the text that will be displayed in the status report, followed by the value stored in the variable "variable name".
_medics array
In this array, place the names of every unit that you want to be considered a "medic" (for healing during rallies). As long as one of these units is still alive, the squad can be healed more fully during rallies. Also more medics that are alive, the quicker the squad will be healed. If you always want the squad to be fully healed, then make the player a medic.
_heal_med number
This is how much units will be healed during rallies if a medic is present (0-1). A 1 means units will be fully healed, while a 0.5 means that units will only be healed to a maximum of 50% health, a 0.2 means up to 20% health, and so on. If you do not wish to allow the player's squad to heal during rallies, set this number to 0. Suggested value: 1.
_heal_nomed number
This is how much units will be healed during rallies if NO medics are present. It uses the same scale as above. This amount should be less than the amount healed if medics are present. If you do not wish to allow the player's squad to heal during rallies, set this number to 0. Suggested value: 0-0.7, depending on how hard you want the mission to be.
_heal_time number
The base number of seconds it takes to heal each injured unit in the squad (during rallies). If this number is 10, then 10 seconds will pass before the first injured unit in the squad is healed, then 10 more will pass until the next unit is healed, and so on. If more than one medic is present, then this number is divided by the number of medics present (in the above example, it would only take 5 seconds each unit if 2 medics were present). If no medics are present, this number will be doubled. Suggested value: 15-120, depending on what balance you want between 'realistic' and 'arcadish' gameplay.
_disableAI bool
If set to 'true', then the units in the player's squad will have their AI partially disabled. They will set to never flee, and their OFP flanking/assaulting AI will be disabled (disableAI "target"). This means they will not move without the player's orders (they will still shoot at targets automatically though). This gives the player very precise over his groups by preventing OFP's AI from taking over (like in a 'regular' player squad that is not set to "engage at will"). However, this can also mean that the player has to 'baby sit' his troops more.
You may want to allow the player to set this (via a global variable) if you have an options menu at mission start.
_language string
The language that shouted commands will be spoken in. If the player has this language addon installed (GENB_HS_sounds_LanguageName.pbo), then the sounds will be heard. If the player doesn't have this language addon installed, the system will attempt to use the player's local language.
RTO/Radio Settings
hs_rto_man object
This unit/object will be considered to be 'carrying' the squad's radio. The player must be close to this unit in order to use the radio thru his action menu. If the object/unit carrying the radio is dead/destroyed, then the radio will not be usable. Make this the player if you always want him to be able to use the radio. If you have an RTO in the squad, then it is suggested you put him here. This can even be a static object or vehicle if you wish.
THIS VARIABLE CAN BE CHANGED AFTER MISSION START. Just assign a different value to this variable, nothing else is required.
If you do NOT want to use the HS radio scripts, then put objnull in here. Doing so will make the rest of this section ignored. You will not be able to assign a different value to this variable after mission start if you do this, however.
_rto_opts array
This array contains the options that will be available to the player via the radio. Just copy and paste the two lines after this array first appears in order to add new options. The options look like this:
_tmp = ["option name", "script.sqs", <{condition}>]
"option name" = the text that will be displayed in the player's action menu for this radio option.
"script.sqs" = the script that will be executed if the player selects this option.
<{condition}> = optional. A boolean condition that must be met in order for this radio option to be displayed and useable. Some examples:
{my_var > 0} {alive unit1} {objective1_complete}
The condition is entirely up to the editor to control, and can be used by more advanced editors to adjust whether the player has access to certain options after mission start.
A number of pre-made support options are included in the "support" folder of the template mission. See the top of each script for instructions on how to implement them.
_rto_beg string
This string contains code that will be executed when the player picks up the radio (via the action menu). It can be used to display radio chatter between the player and base, for example. Place empty braces if you don't want anything here {}.
_rto_end string
This string will be executed when the player hangs up the radio via the action menu. It can be used similarly to the above.
_rto_req string
This string can hold an additional boolean requirement that must be met in order for the player to use/hear the radio. For example, this code: {player hasweapon "GENB_bas_satcom"} would only let the player use the radio if he had the "GENB_bas_satcom" weapon. If you have nothing to put here, then put {true}.
Misc Settings
hs_emy array
This array should contain every unit that is considered an enemy to the player's squad. It is usually the list of a trigger (see template for example). Note that there is a slight (<1s) delay before a trigger's list is initialized; this variable must be set AFTER the trigger initializes. To ensure this, change a boolean variable to 'true' in the trigger's 'on activation' field. Then, in init.sqs, have an @delay waiting for that variable to turn 'true' (again, see template for example).
If you want 2 sides to be considered enemy (east and resistance, for example), then you will need to join 2 trigger lists. An example: hs_emy = (list trigger1) + (list trigger2)
hs_vcl array
In this array you can place the names of all vehicles that will be enterable by the player's squad. The player will be able to order his teams to operate these vehicles (if they are close and not enemy-operated). This variable can be changed after mission start.
_cmd_xtra1/2/3 array
These arrays allow you to customize the last 3 "slots" in the command menu. This allows the editor to use these radio menu / command dialog slots for whatever you desire (like a 'regular' radio trigger). Leave empty arrays [] if you do not wish to use the slot, otherwise you can customize it as follows:
_cmd_xtra1/2/3 = ["Display name", {code}]
"Display name" = The string that will be displayed in this slot.
{code} = the code that will be executed when the player selects this from the menu.
hs_cmd_sht number
This is the maximum distance (in meters) that your squad will be able to hear shouted orders across. The enemy has a random chance to hear these shouts as well, in which case the shouter will be revealed to them. Enemies within 1.5 x _shout_rng have a chance to hear the shout, the chance ranging from 100% to 25%, depending on how far away they are. Suggested range: 100-200, depending on ambient noise level.
This variable can be changed after mission start.
hs_cmd_sig number
This is the maximum distance (in meters) that your squad will be able to see signed orders across. I suggest that you adjust this number depending on how far away units would reasonably be able to see in the mission area. In high fog, darkness, and/or dense vegitation, for example, this should be relatively low, while in open desert, it should be relatively high. Suggested range: 25-75, depending on visiblity.
This variable can be changed after mission start.
_frm_inc number
This is the approximate number of meters spacing between units in formation. This number is multiplied by the current formation dispersion level (set from 1-5 by the player). For example, if this is set to 5, then a squad at 3 dispersion will have approximately 15 meters spacing between each unit. Suggested value: 1-10 depending on player squad size; 5 for regular squads (around 12 men).
_frm_start bool
If set to 'true', then the units in the player's squad will start out in formation around him (the first formation will be used). If 'false', then units will start wherever they are placed on the map, and they will not be following the player (until ordered). There is a slight (~1 second) delay between the mission start and when the units appear in formation around the player. For this reason, it is suggested that a slight fade-in be used at mission start, if this is set to true.
_notify_contact bool
Set this to 'false' if you want to disable the enemy contact notification (that is, the "contact front" or hand signalling that occurs when the enemy is met).
_on_contact string
This code will be executed whenever contact is made with the enemy; that is, when the enemy is spotted after he spots you first (and is usually firing at you). This could be used to play dramatic music during battles, for example. This code is passed the following in the _this variable: [enemy that was spotted, squad member that spotted enemy]
_on_spotted string
This code will be executed whenever your squad spots the enemy before they spot you. As above, the code is passed the following in the _this variable: [enemy that was spotted, squad member that spotted enemy]
_useRadioTrig bool
If you do NOT want to use the 10 radio triggers (0-0-x) to control the player's squad, then set this to 'false' (otherwise set it to 'true'). Normally you should use the radio triggers, even if you also use the dialog, since they are both useful in different ways. Also, remember that there are 3 slots on the main menu that you can customize (above). But if you must use the radio triggers for something else, then set this to 'false' and the HS scripts won't touch the them.
_deathSounds bool
If 'true', then extra screaming sound effects will be played when units (friendly and enemy) die. For the player's squad, units will cry out when nearby buddies get killed (if the approprate language addon is installed). There is also a cutscene effect that plays if the player is near a squadmate getting killed. This cutscene can be disabled by placing this in your init.sqs: hs_deadcam_inuse = true